summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2023-01-28 05:31:41 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2023-01-28 19:50:27 +0100
commite84a441d756e1d9d2d80204cdef586b1c21cf155 (patch)
tree05781d89d4edc27d3b5faa1283f7f51786ca6df7
parentMerge pull request #9685 from liamwhite/minmax (diff)
downloadyuzu-e84a441d756e1d9d2d80204cdef586b1c21cf155.tar
yuzu-e84a441d756e1d9d2d80204cdef586b1c21cf155.tar.gz
yuzu-e84a441d756e1d9d2d80204cdef586b1c21cf155.tar.bz2
yuzu-e84a441d756e1d9d2d80204cdef586b1c21cf155.tar.lz
yuzu-e84a441d756e1d9d2d80204cdef586b1c21cf155.tar.xz
yuzu-e84a441d756e1d9d2d80204cdef586b1c21cf155.tar.zst
yuzu-e84a441d756e1d9d2d80204cdef586b1c21cf155.zip
-rw-r--r--src/yuzu/configuration/input_profiles.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/yuzu/configuration/input_profiles.cpp b/src/yuzu/configuration/input_profiles.cpp
index 9bb69cab1..41ef4250a 100644
--- a/src/yuzu/configuration/input_profiles.cpp
+++ b/src/yuzu/configuration/input_profiles.cpp
@@ -58,13 +58,16 @@ std::vector<std::string> InputProfiles::GetInputProfileNames() {
std::vector<std::string> profile_names;
profile_names.reserve(map_profiles.size());
- for (const auto& [profile_name, config] : map_profiles) {
+ auto it = map_profiles.cbegin();
+ while (it != map_profiles.cend()) {
+ const auto& [profile_name, config] = *it;
if (!ProfileExistsInFilesystem(profile_name)) {
- DeleteProfile(profile_name);
+ it = map_profiles.erase(it);
continue;
}
profile_names.push_back(profile_name);
+ ++it;
}
std::stable_sort(profile_names.begin(), profile_names.end());